data m_gpa f_gpa; set gpa; if sex='M' then output m_gpa; else output f_gpa; run; proc print data=m_gpa; run; proc print data=f_gpa; run;